; ..............................................................................
;    File   111.s
; ..............................................................................

		.equ 111NumTaps, 32

; ..............................................................................
; Allocate and initialize filter taps

		.section .xdata
		.align 64

111Taps:
.hword 	0x0090,	0x00A2,	0x00D8,	0x0130,	0x01A6,	0x0236,	0x02DB,	0x038D,	0x0446
.hword 	0x04FE,	0x05AC,	0x064B,	0x06D3,	0x073E,	0x0788,	0x07AE,	0x07AE,	0x0788
.hword 	0x073E,	0x06D3,	0x064B,	0x05AC,	0x04FE,	0x0446,	0x038D,	0x02DB,	0x0236
.hword 	0x01A6,	0x0130,	0x00D8,	0x00A2,	0x0090

; ..............................................................................
; Allocate delay line in (uninitialized) Y data space

		.section .ybss,  "b"
		.align 64

111Delay:
		.space 111NumTaps*2

; ..............................................................................
; Allocate and intialize filter structure

		.section .data
		.global _111Filter

_111Filter:
.hword 111NumTaps
.hword 111Taps
.hword 111Taps+111NumTaps*2-1
.hword 0xff00
.hword 111Delay
.hword 111Delay+111NumTaps*2-1
.hword 111Delay

; ..............................................................................
; ..............................................................................
; Sample assembly language calling program
;  The following declarations can be cut and pasted as needed into a program
;		.extern	_FIRFilterInit
;		.extern	_BlockFIRFilter
;		.extern	_111Filter
;
;		.section	.bss
;
;	 The input and output buffers can be made any desired size
;	   the value 40 is just an example - however, one must ensure
;	   that the output buffer is at least as long as the number of samples
;	   to be filtered (parameter 4)
;input:		.space	40
;output:	.space	40
;		.text
;
;
;  This code can be copied and pasted as needed into a program
;
;
; Set up pointers to access input samples, filter taps, delay line and
; output samples.
;		mov	#_111Filter, W0	; Initalize W0 to filter structure
;		call	_FIRFilterInit	; call this function once
;
; The next 4 instructions are required prior to each subroutine call
; to _BlockFIRFilter
;		mov	#_111Filter, W0	; Initalize W0 to filter structure
;		mov	#input, W1	; Initalize W1 to input buffer 
;		mov	#output, W2	; Initalize W2 to output buffer
;		mov	#20, W3	; Initialize W3 with number of required output samples
;		call	_BlockFIRFilter	; call as many times as needed
